﻿<rules>
  <rule id="Entry.Core.1025" category="core" target="entry" specificationsection ="2.2.6.3.3" requirementlevel="mustnot" format="json" mle="false">
    <description>If the entity being represented is not a Media Link Entry, then the "edit_media", "media_src", "media_etag", and "content_type" name/value pairs MUST NOT be included.</description>
    <action processor="jsonschema">
      <jsonschema>
        {
        "additionalProperties" : false,
        "type" : "object",
        "properties" : {

        "d" : {
        <!-- Set additionalProperties to true to allow any other object other than Property -->
        "additionalProperties" : true,
        "type" : "object",
        "properties" : {

        "__metadata" : {
        "additionalProperties" : false,
        "type" : "object",
        "properties" : {

        "uri" : { "type" : "any", "required" : false },
        "type" : { "type" : "any", "required" : false },
        "etag" : { "type" : "any", "required" : false },

        "disallow" : {
        "type" : ["string", "array"],
        "items" : {
        "edit_media" : { "type" : "any" },
        "media_src" : { "type" : "any" },
        "media_etag" : { "type" : "any" },
        "content_type" : { "type" : "any" }
        }
        }

        }
        }

        }
        }
      </jsonschema>
    </action>
    <errormessage>If the entity being represented is not a Media Link Entry, then the "edit_media", "media_src", "media_etag", and "content_type" name/value pairs MUST NOT be included.</errormessage>
  </rule>
</rules>